﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BKH.BLL;

namespace BKH.MyUserControl.UCHienThi
{
    public partial class ucQuanLyThuoc : UserControl
    {
        public ucQuanLyThuoc(String IDNV)
        {
            InitializeComponent();
            this.IDNV = IDNV;
            LoadInit();
        }
        private String IDNV;

        private void label6_Click(object sender, EventArgs e)
        {

        }

        void LoadInit()
        {

            NhaCungCapBUO cungcap = new NhaCungCapBUO();
            cbNhaCungCap.DataSource = cungcap.GetAll().Select(n => new {ID=n.NhaCungCapID,Ten=n.Name }).ToList();
            cbNhaCungCap.DisplayMember = "Ten";
            cbNhaCungCap.ValueMember = "ID";


            NhanVienBUO nv = new NhanVienBUO();
           
            KhoaBUO khoa = new KhoaBUO();
            lblDonVi.Text = khoa.GetTenKhoa(nv.GetMaKhoa(int.Parse(IDNV)));


         
        
        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            NhaCungCapBUO ncc = new NhaCungCapBUO();
            tbl_NhaCungCap cungcap = new tbl_NhaCungCap();
            cungcap.Name = cbNhaCungCap.Text;

            
                
            
        }
    }
}
